<!--
 * @Description: 
 * @Author: william
 * @Date: 2024-08-22 16:22:53
 * @LastEditors: william
 * @LastEditTime: 2025-07-08 14:40:42
-->
<template>
  <view
    class="page-container"
    :style="{
      height: windowHeight + 'px'
    }"
    :="$attrs"
  >
    <slot />
  </view>
</template>

<script setup>
defineOptions({
  name: 'PageContainer',
  inheritAttrs: false
})

const props = defineProps({
  isTitle: {
    type: Boolean,
    default: true
  },
  isTabbar: {
    type: Boolean,
    default: false
  }
})

const windowHeight = ref('')

onMounted(_ => {
  windowHeight.value = g_utils.getPageNum(props.isTitle, props.isTabbar).height
})
</script>

<style lang="scss" scoped>
.page-container {
  position: relative;
  display: flex;
  flex-direction: column;
  /* #ifdef APP-PLUS */
  background-color: var(--body-theme);
  overflow-x: hidden;
  /* #endif */
  /* #ifndef APP-PLUS */
  background-color: var(--body-theme);
  box-sizing: border-box;
  overflow-x: hidden;
  /* #endif */
}
</style>
